const Client = require('../libs/client');

const client = new Client('ws://127.0.0.1:3000');

setTimeout(() => {
    console.log('call find all project.')
    client.findAllProject();    
}, 2000);

// setTimeout(() => {
//     console.log('call find all project.')
//     let project = {projectName:'BMW产品原型',
//     description:'BMW项目定制产品原型'};
//     client.addNewProject(project);    
// }, 1000);
setTimeout(() => {
    console.log('call find all project.')
    let version = {projectId:3,changeList:'项目初始化',uploadDateTime: new Date()};
    let localFolder = 'C:\\Users\\董峥\\元年\\项目文档\\1.etax2.0\\原型设计\\输出\\BMW同步数据处理规则+邮件配置原型';
    client.addNewVersion(version,(newVersion)=>{
        client.uploadPRFile(newVersion.projectId,newVersion.projectId,localFolder,(result)=>{
            console.log(result);
        });
    });    
}, 1500);